package com.youan.log.common.bean;

import lombok.Data;

@Data
public class ValidateResult {
    private Boolean pass = false;
    private String message;

    private ValidateResult() {
    }

    public Boolean isPass() {
        return pass;
    }
    public static ValidateResult success() {
        ValidateResult result = new ValidateResult();
        result.setPass(true);
        return result;
    }

    public static ValidateResult success(String message) {
        ValidateResult result = new ValidateResult();
        result.setPass(true);
        result.setMessage(message);
        return result;
    }

    public static ValidateResult failure(String message) {
        ValidateResult result = new ValidateResult();
        result.setPass(false);
        result.setMessage(message);
        return result;
    }


}
